﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DotNetExtensions.AspNet.Http.Events
{
    public delegate void FileTransferProgressDelegate(string url, RequestTransferArgs e);
    public class RequestTransferArgs
    {
        public long RequestId { get; private set; }
        public bool Successed { get; set; } = false;
        public bool Cancel { get; set; }
        public byte[] Content { get; set; }
        public string ErrorMessage { get; set; }
        public RequestTransferArgs() { }
        public RequestTransferArgs(long requestId)
        {
            RequestId = requestId;
        }
    }
    public class FileTransferArgs : RequestTransferArgs
    {
        public long Size { get; set; }

        public double Progress { get; set; }

        public string FileName { get; set; }

        public object ExtraData { get; set; }

        public FileTransferArgs(long requestId) : base(requestId) { }
    }

    public class BatchTransferArgs : FileTransferArgs
    {
        public BatchTransferArgs(long requestId) : base(requestId) { }
    }
}
